import axios from '../utils/http'; // 导入http中创建的axios实例
import { Base64 } from '../utils/base';
let baseObj = new Base64()
const base_url = process.env.BASE_API;
const inter_url = '/proxy/cam/proxy/common?api='

const taskApi = {
  // 获取任务列表
  getCustomerTaskList(params) {
    let url = 'CustomerSolicitFacade-getCustomerTaskList'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 查询任务表数据详情
  getCustomerTaskById(params) {
    let url = 'CustomerSolicitFacade-getCustomerTaskById'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 新增任务表跟踪记录
  addNewCustomerTaskFollow(params) {
    let url = 'CustomerSolicitFacade-addNewCustomerTaskFollow'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 任务转交
  customerTaskFollow(params) {
    let url = 'CustomerSolicitFacade-customerTaskFollow'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 获取任务新增数跟跟进数
  getTaskAddAndFollowCount(params) {
    let url = 'CustomerSolicitFacade-getTaskAddAndFollowCount'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 获取逾期数据明细，战败数据明细
  getTaskDataByPerson(params) {
    let url = 'CustomerSolicitFacade-getTaskDataByPerson'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },

  // 任务数据统计
  taskDataCal(params) {
    let url = 'CustomerSolicitFacade-taskDataCal'
    return axios.post(`${base_url}${inter_url}${baseObj.encode(url)}`, params);
  },
}

export default taskApi;
